#!/usr/bin/env node

const fs = require('fs'),
      src = process.argv[2],
      lnk = process.argv[3],
      sName = process.argv[4];
if(sName == '-s'){
  fs.symlinkSync(src,lnk);//创建符号链接
  console.log('符号链接创建成功！');
}else if(sName == undefined){ 
  fs.linkSync(src,lnk);//创建硬连接
  console.log('硬连接创建成功！');
}else{
  console.error('输入不正确，请重新输入');
  process.exit(1);
}

